package mall

import (
	"github.com/gin-gonic/gin"
	v1 "mall-go-gin/api/v1"
	"mall-go-gin/middleware"
)

type MallOrderRouter struct{}

func (m *MallOrderRouter) InitMallOrderRouter(Router *gin.RouterGroup) {
	mallOrderRouter := Router.Group("v1").Use(middleware.UserJWTAuth())

	var mallOrderRouterApi = v1.ApiGroupApp.MallApiGroup.MallOrderApi

	{
		mallOrderRouter.GET("/order", mallOrderRouterApi.OrderList) //订单列表接口
		mallOrderRouter.POST("/saveOrder", mallOrderRouterApi.SaveOrder)
		mallOrderRouter.GET("/paySuccess", mallOrderRouterApi.PaySuccess) //模拟支付成功回调的接口
	}
}
